import type { RouteRecordRaw } from 'vue-router'

export const mainRoutes: RouteRecordRaw[] = [
  {
    path: '/main',
    name: 'main',
    redirect: '/main/dashboard',
  },
  {
    path: '/main/dashboard',
    name: 'mainDashboard',
    component: () => import('@/views/main/dashboard.vue'),
  },
  {
    path: '/main/overview',
    name: 'mainOverview',
    component: () => import('@/views/main/overview.vue'),
  },
]

export const systemRoutes: RouteRecordRaw[] = [
  {
    path: '/system',
    name: 'system',
    redirect: '/system/user',
  },
  {
    path: '/system/user',
    name: 'systemUser',
    component: () => import('@/views/system/User.vue'),
  },
  {
    path: '/system/menu',
    name: 'systemMenu',
    component: () => import('@/views/system/Menu.vue'),
  },
  {
    path: '/system/role',
    name: 'systemRole',
    component: () => import('@/views/system/Role.vue'),
  },
  {
    path: '/system/department',
    name: 'systemDepartment',
    component: () => import('@/views/system/Department.vue'),
  },
]

export const contentRoutes: RouteRecordRaw[] = [
  {
    path: '/content',
    name: 'content',
    redirect: '/content/article',
  },
  {
    path: '/content/article',
    name: 'contentArticle',
    component: () => import('@/views/content/Article.vue'),
  },
  {
    path: '/content/category',
    name: 'contentCategory',
    component: () => import('@/views/content/Category.vue'),
  },
]

export default [...mainRoutes, ...systemRoutes, ...contentRoutes]
